package Graphics
{
	import flash.display.BitmapData;
	import flash.display.Bitmap;
	import flash.geom.Point;
	
	public class TileSet
	{
		private var tileSheet:BitmapData;			//Tile Sheet Image
		private var width:int;
		private var height:int;
		private var tileWidth:int ;				//Width of Single Tile
		private var tileHeight:int;				//Height of Single Tile
		private var tilesPerRow:int;
		public var position:Point;
		
		public function get Width():int
		{
			return width;
		}
		public function get Height():int
		{
			return height;
		}
		public function get bitmapData():BitmapData
		{
			return tileSheet;
		}
		public function get Row():int
		{
			return tilesPerRow;
		}
		public function get TileWidth():int
		{
			return tileWidth;
		}
		public function get TileHeight():int
		{
			return tileHeight;
		}
		
		public function TileSet(bitmap:Bitmap, tileWidth:int, tileHeight:int)
		{
			tileSheet = bitmap.bitmapData;
			width = bitmap.width;
			height = bitmap.height;
			this.tileHeight = tileHeight;
			this.tileWidth = tileWidth;
			tilesPerRow = int(width/ this.tileWidth);
			
		}
	}
}